package work.person;


import work.fram.AutoSqlWriter;
import work.fram.FileGroup;
import work.fram.GroupsWrapper;
import work.person.groups.Other;
import work.person.groups.Zb;
import work.person.helper.LoggerHelper;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Do {

    //添加处理项
    public static GroupsWrapper groupsWrapper() {
        List<FileGroup> groups = new ArrayList<>();
        groups.add(new Zb());

        String o = "学历信息\n" +
                "语言能力信息\n" +
                "兼职借用信息\n" +
                "执业资格信息\n" +
                "合同信息\n" +
                "任职信息信息\n" +
                "专业技术职务信息\n" +
                "工人技术等级信息\n" +
                "履历记录信息\n" +
                "培训情况信息\n" +
                "奖励情况信息\n" +
                "处分情况信息\n" +
                "家庭信息\n" +
                "班子情况信息\n" +
                "参加党派记录信息\n" +
                "出国（出境）情况信息";

        String[] split = o.split("\n");

        for (String s : split) {
            s = s.trim();
            if (!s.equals("")) {//只处理主表
            //    groups.add(new Other(s));
            }
        }

        PersonGW groupsWrapper = new PersonGW();
        groupsWrapper.setFileGroups(groups);
        return groupsWrapper;
    }


    //判断是否有必要对对应的记录进行处理
    public static boolean shouldHandle(File file, String name, String idcard) {
        return true;
    }

    public static void main(String[] args) throws IOException {


        Handle.main(args);

        //关闭日志
        LoggerHelper.close();
        SqlHandler.close();

        AutoSqlWriter.INSTANCE.close();

    }

}
